package controller.admin.shop;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import model.entity.Shop;
import service.Impl.ShopServiceImpl;
import service.ShopService;
import util.Result;
import util.ResultUtil;

import java.io.IOException;

@WebServlet("/admin/shop")
public class ShopStatusController extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        ShopServiceImpl shopService=new ShopServiceImpl();
        Shop shop=shopService.getShop();
        String json= ResultUtil.getJSON(shop);
        resp.getWriter().write(json);
    }
}
